package zdh.avatar.gui;

import javax.swing.*;
import javax.swing.event.ListDataListener;
import zdh.avatar.base.*;

/**
 *
 * @author Gem Seeker
 */
public class ModelPanelList implements ListModel<String> {

    private ElementPanel[] panels;
    
    public ModelPanelList(ElementPanel[] panels){
        this.panels = panels;
    }
    
    public ElementPanel getPanel(int index){
        return panels[index];
    }
    
    @Override
    public int getSize() {
        return panels.length;
    }

    @Override
    public String getElementAt(int index) {
        return panels[index].getPanelName();
    }

    @Override
    public void addListDataListener(ListDataListener l) {
    }

    @Override
    public void removeListDataListener(ListDataListener l) {
    }
    
}
